package com.community.system.service.impl;

import java.util.List;
import com.community.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.community.system.mapper.PatrolPointMapper;
import com.community.system.domain.PatrolPoint;
import com.community.system.service.IPatrolPointService;

/**
 * pointService业务层处理
 * 
 * @author ruoyi
 * @date 2025-10-27
 */
@Service
public class PatrolPointServiceImpl implements IPatrolPointService 
{
    @Autowired
    private PatrolPointMapper patrolPointMapper;

    /**
     * 查询point
     * 
     * @param patrolPointId point主键
     * @return point
     */
    @Override
    public PatrolPoint selectPatrolPointByPatrolPointId(Long patrolPointId)
    {
        return patrolPointMapper.selectPatrolPointByPatrolPointId(patrolPointId);
    }

    /**
     * 查询point列表
     * 
     * @param patrolPoint point
     * @return point
     */
    @Override
    public List<PatrolPoint> selectPatrolPointList(PatrolPoint patrolPoint)
    {
        return patrolPointMapper.selectPatrolPointList(patrolPoint);
    }

    /**
     * 新增point
     * 
     * @param patrolPoint point
     * @return 结果
     */
    @Override
    public int insertPatrolPoint(PatrolPoint patrolPoint)
    {
        patrolPoint.setCreateTime(DateUtils.getNowDate());
        return patrolPointMapper.insertPatrolPoint(patrolPoint);
    }

    /**
     * 修改point
     * 
     * @param patrolPoint point
     * @return 结果
     */
    @Override
    public int updatePatrolPoint(PatrolPoint patrolPoint)
    {
        patrolPoint.setUpdateTime(DateUtils.getNowDate());
        return patrolPointMapper.updatePatrolPoint(patrolPoint);
    }

    /**
     * 批量删除point
     * 
     * @param patrolPointIds 需要删除的point主键
     * @return 结果
     */
    @Override
    public int deletePatrolPointByPatrolPointIds(Long[] patrolPointIds)
    {
        return patrolPointMapper.deletePatrolPointByPatrolPointIds(patrolPointIds);
    }

    /**
     * 删除point信息
     * 
     * @param patrolPointId point主键
     * @return 结果
     */
    @Override
    public int deletePatrolPointByPatrolPointId(Long patrolPointId)
    {
        return patrolPointMapper.deletePatrolPointByPatrolPointId(patrolPointId);
    }
}
